package com.kevinxiaoge.ruoli.service.impl;

import com.kevinxiaoge.ruoli.bean.Employee;
import com.kevinxiaoge.ruoli.dao.EmployeeMapper;
import com.kevinxiaoge.ruoli.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author chengyuanyuan
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public List<Employee> getEmployee() {
        return employeeMapper.getEmployee();
    }

    @Override
    public void saveEmployee(Employee employee) {
        employeeMapper.saveEmployee(employee);
    }

    @Override
    public Integer getEmployeeCount() {
        return employeeMapper.getEmployeeCount();
    }

    @Override
    public Employee getEmployeeByUsernameAndId(String id, String username) {
        return employeeMapper.getEmployeeByUsernameAndId(id,username);
    }
}
